<!doctype html>
<html>
 <head>
	<meta charset="UTF-8">
	<meta name="Generator" content="EditPlus®">
	<meta name="Author" content="">
	<meta name="Keywords" content="">
	<meta name="Description" content="">
	<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE"> 
	<meta name="renderer" content="webkit">
	<title>用户注册</title>
    <link rel="shortcut icon" type="image/x-icon" href="{{asset('theme/icon/favicon.ico')}}">
    <script src="{{asset('theme/js/jquery-3.1.1.min.js')}}"></script>
	<link rel="stylesheet" type="text/css" href="{{asset('theme/css/base.css')}}">
	<link rel="stylesheet" type="text/css" href="{{asset('theme/css/login.css')}}">
 </head>
 <body>

<!--- header begin-->
<header id="pc-header">
    <div class="login-header" style="padding-bottom:0">
        <div><h1><a href="index.html"><img src="{{asset('theme/icon/logo.png')}}"></a></h1></div>
    </div>
</header>
<!-- header End -->



<section id="login-content">
    <div class="login-centre">
        <div class="login-switch clearfix">
            <p class="fr">我已经注册，现在就 <a href="{{asset('login')}}">登录</a></p>
        </div>
        <div class="login-back">
            <div class="H-over">
                <form id="register" method="post" action="{{asset('register')}}">
                    <input id="token" name="_token" type="hidden" value="<?php echo csrf_token() ?>">
                    <div class="login-input">
                        <label><i class="heart">*</i>用户名：</label>
                        <input type="text" class="list-input1" id="username" name="username" placeholder="">
                        <div class="errUname"></div>
                    </div>
                    <div class="login-input">
                        <label><i class="heart">*</i>请设置密码：</label>
                        <input type="password" class="list-input" id="password" name="password" placeholder="">
                        <div class="errPwd"></div>
                    </div>
                    <div class="login-input">
                        <label><i class="heart">*</i>请确认密码：</label>
                        <input type="password" class="list-input" id="password1" name="password1" placeholder="">
                        <div class="errAgainPwd"></div>
                    </div>
                    <div class="login-input">
                        <label><i class="heart">*</i>生日：</label>
                        <input type="text" class="list-input" id="birth" name="birth" placeholder="">
                    </div>
                    <div class="login-input">
                        <label><i class="heart">*</i>邮箱：</label>
                        <input type="text" class="list-input" id="email" name="email" placeholder="">
                        <div class="errEmail"></div>
                    </div>
                    <div class="login-input">
                        <label><i class="heart">*</i>验证码：</label>
                        <input type="text" class="list-notes" id="captcha" name="captcha" placeholder="">
                        <img id="imgCaptcha" style="cursor: pointer;" src="{{captcha_src()}}" onclick="this.src='{{captcha_src()}}' + Math.random()">
                        <div style="color: red;" class="errCaptcha">
                            @if(Session::has('errCaptcha'))
                                {{Session::get('errCaptcha')}}
                            @endif
                        </div>
                    </div>
                    <div class="item-ifo">
                        <input type="checkbox" onClick="agreeonProtocol();" id="readme" checked="checked" class="checkbox">
                        <label for="protocol">我已阅读并同意<a id="protocol" class="blue" href="#">《悦商城用户协议》</a></label>
                        <span class="clr"></span>
                    </div>
                    <div class="login-button">
                        <a id="run" href="javascript:void(0);">立即注册</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</section>

<!--- footer begin-->
<footer id="footer">
    <div class="containers">
        <div class="w" style="padding-top:30px">
            <div id="footer-2013">
                <div class="links">
                    <a href="">关于我们</a>
                    |
                    <a href="">联系我们</a>
                    |
                    <a href="">人才招聘</a>
                    |
                    <a href="">商家入驻</a>
                    |
                    <a href="">广告服务</a>
                    |
                    <a href="">手机京东</a>
                    |
                    <a href="">友情链接</a>
                    |
                    <a href="">销售联盟</a>
                    |
                    <a href="">English site</a>
                </div>
                <div style="padding-left:10px">
                    <p style="padding-top:10px; padding-bottom:10px; color:#999">网络文化经营许可证：浙网文[2013]0268-027号| 增值电信业务经营许可证：浙B2-20080224-1</p>
                    <p style="padding-bottom:10px; color:#999">信息网络传播视听节目许可证：1109364号 | 互联网违法和不良信息举报电话:0571-81683755</p>
                </div>
            </div>
        </div>

    </div>
</footer>
<!-- footer End -->
</body>
 <script src="{{asset('theme/js/auth.js')}}"></script>
 <script>
     (function () {
         function name() {
             var uname = /^\w{5,11}$/;
             if (uname.test($('#username').val())) {
                 $('.errUname').html('');
                 return true;
             }
             $('.errUname').html('用户名只能是6~12位的字母，数字，或下划线');
             return false;
         }
         function pwd() {
             var pwd = /^[a-zA-Z]\w{5,17}$/;
             if (pwd.test($('#password').val())) {
                 $('.errPwd').html('');
                 return true;
             }
             $('.errPwd').html('密码只能以字母开头，长度在6~18之间，只能包含字符、数字和下划线');
             return false;
         }
         function againPwd() {
             if($('#password').val() === $('#password1').val()){
                 $('.errAgainPwd').html('');
                 return true;
             }
             $('.errAgainPwd').html('两次密码不一致');
             return false;
         }
         $('#username').blur(name);
         $('#password').blur(pwd);
         $('#password1').blur(againPwd);
         $('#run').click(function () {
             if(name() && pwd() && againPwd()){
                $('#run').attr('href',"javascript:document.getElementById('register').submit()")
             }else{
                 alert('fuck');
             }
         });
     })();
 </script>

</html>